package com.hcryan.djm.exception;

import lombok.Getter;

/**
 * @author ryanwdj
 * @since 2025/2/18
 */
@Getter
public enum ErrorMessage {

    SUCCESS(0, "请求成功"),
    ERROR(1, "请求有误"),
    INTERNAL_ERROR(10000, "内部错误,请联系管理员"),
    EXTERNAL_ERROR(10001, "请求外部服务错误，请联系管理员"),

    EMPTY_USER(20000, "用户未注册"),
    ERROR_PASSWORD(20001, "密码错误"),

    EXCEPTION(99999, "%s");;

    private final int code;
    private final String message;

    ErrorMessage(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
